package com.oya.worktalk.dao;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.support.SqlSessionDaoSupport;

import com.oya.worktalk.dto.Article;

public class ArticleDaoImp extends SqlSessionDaoSupport implements ArticleDao{

	@Override
	public int insertArticle(Article article) {
		logger.info("#######################################################");
		logger.info(article.toString()+"");
		
		return getSqlSession().insert("articles.insertArticle", article);
	}
	
	@Override
	public List<Map<String, Article>> getArticles(int jobCode) {
		logger.info("#######################################################");
		return getSqlSession().selectList("articles.getArticles", String.valueOf(jobCode));
	}

}
